﻿@model Itfort.Web.PageResult
@{
	ViewBag.Title = "修改邮箱";
	Layout = "~/Views/Shared/_Layout.cshtml";

	ViewBag.CurrentNavItem = "Email";
}

<div class="index-title">
	<h3>修改邮箱</h3>
</div>

@using (Html.BeginForm("Email", "AccountInfo"))
{
	<div class="formbox">
		@if (Model.Status == Itfort.Web.ResultStatus.Success)
  {
			<div class="ok">密码修改成功</div> 
  }
  else if (Model.Status == Itfort.Web.ResultStatus.Failure)
  {
			<div>@Model.FailureMessage</div>
  }

		<table class="form">
			<tr>
				<td>邮箱：</td>
				<td>
					<p>
						@Html.TextBox("email", null, new { size = 30 })
					</p>

				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" value="下一步" /></td>
			</tr>
		</table>
	</div>
}


@section BottomScripts
	{
	<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$("form").validate({
				rules: {
					email: {
						required: true,
						email: true
					}
				},
				messages: {
					email: {
						required: "请输入一个电子邮箱",
						email: "请输入一个正确的电子邮箱"
					}
				},
				errorPlacement: function (error, element) {
					error.appendTo(element.parent().parent());
				}
			});
		});
	</script>
}

